package com.lightningtrade.mapper;

import com.lightningtrade.domain.SysProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysProductMapper {

    int insertProduct(SysProduct sysProduct);

    int updateProduct(SysProduct sysProduct);

    int deleteProduct(@Param("id") Integer id);

    SysProduct selectProductById(@Param("id") Integer id);

    List<SysProduct> selectProductByName(@Param("productName") String productName);

    List<SysProduct> selectAllProducts();

    int updateProductStatus(@Param("id") Integer id, @Param("status") Integer status);
}
